//
//  NotifyingClass.m
//  TextApp
//
//  Created by panos on 16/11/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "NotifyingClass.h"

@implementation NotifyingClass

- (IBAction)displaySomeText:(id)sender
{
    NSString *firstObject = @"Milk ";
	NSString *secondObject = @"Eggs ";
	NSString *thirdObject = @"Butter ";
	
	NSArray *shoppingListArray = [NSArray arrayWithObjects:
								  firstObject, secondObject, thirdObject, nil];
       
    [textView insertText:[self stringFinal:shoppingListArray]];
}

- (NSString *) stringFinal:(NSArray *)array
{
    NSString *sideBySide = @"shoppingListArray: "; 
        
    NSString *commaSep = [array componentsJoinedByString:@", "];
    
    sideBySide = [sideBySide stringByAppendingString:
                  [commaSep stringByAppendingString:@"\n"]];
    
    return sideBySide;
}

@end
